#  查询结果
import sqlite3

conn = sqlite3.connect('test.db')
cursor = conn.cursor()
#  执行查询语句
cursor.execute('SELECT * FROM user WHERE id=?', '2')
#  获得查询结果集
values = cursor.fetchall()
print(values)
cursor.close()
conn.close()
